package com.test.service.impl;

import com.test.dao.IBuildValveHistoricalDao;
import com.test.model.BuildValveCurrentData;
import com.test.model.BuildValveHistoricalData;
import com.test.service.IBuildValveHistoricalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by ZZF on 2017/7/12.
 */
@Service
public class BuildValveHistoricalServiceImpl implements IBuildValveHistoricalService {

    @Autowired
    IBuildValveHistoricalDao buildValveHistoricalDao;

    @Override
    public void addHistorical(BuildValveCurrentData buildValveCurrentData) {


                BuildValveHistoricalData buildValveHistoricalData=new BuildValveHistoricalData();

                buildValveHistoricalData.setPlanTime(buildValveCurrentData.getPlanTime());
                buildValveHistoricalData.setBuildValveId(buildValveCurrentData.getBuildValveId());
                buildValveHistoricalData.setActualOpening(buildValveCurrentData.getActualOpening());


                buildValveHistoricalDao.save(buildValveHistoricalData);
            }


}
